/* 
 * File:   Main.cpp
 * Author: RamneekHanda
 *
 * Created on October 8, 2011, 1:49 AM
 */

#include <cstdlib>
#include "includes/HWTree.H"
using namespace std;

std::map<double, double> getInputZeroCoupons() {
    std::map<double, double> yield_curve;

    yield_curve[1.0 / 12.0] = 0.22994 / 100;
    yield_curve[1.0 / 4.0] = 0.35022 / 100;
    yield_curve[1] = 0.4478 / 100;
    yield_curve[2] = 0.50479 / 100;
    yield_curve[3] = 0.56793 / 100;
    yield_curve[4] = 0.94326 / 100;
    yield_curve[5] = 1.26067 / 100;

    return yield_curve;
}

int main(int argc, const char * argv[]) {
    // change the getInputZeroCoupon to return the right ZCBs
    std::map<double, double> zeros = getInputZeroCoupons();
    HWTreeOutput hwOutput = HWTreePricer(0.002, 0.0115, 100, 1, zeros, 0.1, 0.5, 5, 0.3, PUT, false);
    HWTreeOutput hwOutput1 = HWTreePricer(0.002, 0.0115, 100, 1, zeros, 0.1, 0.5, 5, hwOutput.bondPrice, PUT, false);
    //HWTreeOutput hwOutput1 = HWTreePricer(0.002, 0.0115, 1000, 1, zeros, 0.1, 0.5, 5, 0.3, CALL, false);
    return 0;
}
